{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "7ba89f80-0dd2-420c-8813-f1ab76a950ed",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "大于100\n"
     ]
    }
   ],
   "source": [
    "n = 100\n",
    "if n < 10 :\n",
    "    print(\"小于10\")\n",
    "elif n < 100 :\n",
    "    print(\"大于等于10小于100\")\n",
    "else:\n",
    "    print(\"大于等于100\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f9055c1c-e494-4035-85d8-6073cc2b9a5e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Something's wrong with the internet\n"
     ]
    }
   ],
   "source": [
    "http_response_status = 500\n",
    "\n",
    "match http_response_status:\n",
    "        case 400:\n",
    "            print(\"Bad request\" )\n",
    "        case 404:\n",
    "            print( \"Not found\")\n",
    "        case 418:\n",
    "            print( \"I'm a teapot\")\n",
    "        case _:  # 默认\n",
    "            print( \"Something's wrong with the internet\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
